package com.example.day12.ex01;
class Cat{
    public void eat() {
        System.out.println("猫吃鱼");
    }
}
class CatOperator{
    public void useCat(Cat c){
        c.eat();
    }
    public Cat getCat(){
        Cat c= new Cat();
        return c;
    }
}
public class CatDemo {
    public static void main(String[] args) {
        CatOperator co=new CatOperator();
        Cat c= new Cat();
        co.useCat(c);
        Cat c2= co.getCat();
        c2.eat();
    }
}
